GitHub actions
With GitHub Actions, you can deploy the documentation site each time changes are pushed to the remote repository.
Create a file in .github\workflows\ci.yaml
(in your local repository) with the following text, then commit and push the changes.
ci.yaml
ci.yaml | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
With Code Execution (markdown-exec)¶
To execute code importing your own package, or any package hosted on GitHub, you first need to add the instruction to install it:
ci.yaml | |
---|---|
1 |
|
For this example, I used: run: pip install git+https://github.com/lennon-c/SandBox_Mkdocs.git
.
Problems¶
-
If your executed code fetches data that is not contained in the package but resides only on your computer, the code will break during deployment.
- By contrast, if you deploy manually (e.g., using
mkdocs gh-deploy
), the code will still work.
- By contrast, if you deploy manually (e.g., using
-
This could be problematic if the data is large, or if you do not want to load it or make it publicly available.